/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package consys.social.core.dao;

import consys.social.core.bo.Entity;
import java.io.IOException;
import java.util.List;

/**
 * Data access for Follow Service
 *
 * @author Petr Kunc
 */
public interface FollowDao {

    void follow(Entity who, Entity whom) throws IOException;

    void block(Entity who, Entity whom) throws IOException;

    int getFollowersCount(Entity who) throws IOException;

    int getFollowingCount(Entity who) throws IOException;

    void unfollow(Entity who, Entity whom) throws IOException;

    List<String> getAllFollowers(Entity entity) throws IOException;

    List<String> getAllFollowings(Entity entity) throws IOException;

    List<Entity> getFollowings(Entity entity, int from, int howMany) throws IOException;

    List<Entity> getFollowers(Entity entity, int from, int howMany) throws IOException;

    List<Entity> getRandomFollowings(Entity entity, int count) throws IOException;

    List<Entity> getRandomFollowers(Entity entity, int count) throws IOException;

    boolean isFollowing(Entity who, Entity whom) throws IOException;
}
